#include <iostream>
using namespace std;

int prime(int n){
    if(n<2)    return false;
    for(int i=2;i*i<=n;i++){
        if(n%i==0)    return false;
    }
    return true;
}

signed main()
{
    string s;
    cin>>s;
    int flag = 1;
    while(!s.empty()){
        cout<<s<<" ";
        if(prime(stoi(s)))    cout<<"Yes\n";
        else{    cout<<"No\n";    flag = 0;    }
        s.erase(s.begin());
    }
    if(flag)    cout<<"All Prime!\n";
    return 0;
}
